package com.china_goldcard.igas.http.base;


import com.china_goldcard.igas.enums.RespCode;
import com.china_goldcard.igas.utils.StringUtils;

/**
 * 响应结果
 */
public class HttpRespResult {

    // 响应码
    private String responseCode;

    // 响应描述
    private String message;

    /**
     * 是否响应成功
     * @return
     */
    public boolean isSucc(){
        return RespCode.Success.getValue().equals(StringUtils.trimNull(responseCode));
    }

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "HttpRespResult{" +
                "responseCode='" + responseCode + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
